/**
 * 
 */
package org.pump.client.codec;

import org.apache.mina.core.buffer.IoBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author liudong03
 *
 */
public class EofPacket extends ResultPack{
	private static final Logger mylog = LoggerFactory.getLogger(EofPacket.class);
	int warning_count;
	int status_flag;
	
	public static EofPacket readBuffer(IoBuffer in,int len)
	{
		if(in.remaining() < len)
		{
			return null;
		}
		EofPacket mypacket = new EofPacket();
		mypacket.warning_count = in.getUnsignedShort();
		mypacket.status_flag = in.getUnsignedShort();
		return mypacket;
	}
	/**
	 * 
	 */
	public EofPacket() {
		// TODO Auto-generated constructor stub
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "EofPacket [warning_count=" + warning_count + ", status_flag="
				+ status_flag + "]";
	}
	
	

}
